package name.sraynal.msgdispatcher.controller;

import name.sraynal.msgdispatcher.event.Event;
import name.sraynal.msgdispatcher.model.DispatcherModel;
import name.sraynal.msgdispatcher.view.View;

public abstract class Controller {

	/**
	 * Model.
	 */
	protected DispatcherModel model;
	protected Display display;

	public Controller(DispatcherModel model, Display display) {
		this.model = model;
		this.display = display;
	}

	/**
	 * Send event.
	 * 
	 * @param eventType
	 */
	public abstract void sendEvent(Event event);

	protected void displayView(View view) {
		Displayable displayable = view.getDisplayable();
		this.display.setCurrent(displayable);
	}
}
